package com.jd.jmeter;

import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.protocol.java.sampler.AbstractJavaSamplerClient;
import org.apache.jmeter.protocol.java.sampler.JavaSamplerContext;
import org.apache.jmeter.samplers.SampleResult;

import com.jd.passport.TestSession;

public class UserSessionTest extends AbstractJavaSamplerClient {
	TestSession ts = new TestSession();
	
	
	public Arguments getDefaultParameters() {
		Arguments params = new Arguments();
		params.addArgument("hello", "hello");
		return params;
	}

	public void setupTest(JavaSamplerContext arg0) {
		
	}

	@Override
	public SampleResult runTest(JavaSamplerContext arg0) {
		boolean success = true;
		SampleResult results = new SampleResult();
		results.sampleStart();
		try {
			ts.ICERemoteEffect("xxgo", 1928382623);
		} catch (Exception e) {
			success = false;
		} finally {
			results.sampleEnd(); 
			results.setSuccessful(success); 
		}
		return results;
	}

	public void teardownTest(JavaSamplerContext arg0) {
	}
}